package com.clear.builder.simplification;

import com.clear.builder.simplification.HtmlDocument;
import lombok.extern.slf4j.Slf4j;

/**
 * 测试内部类简化建造者模式
 */
@Slf4j
public class Main {
    public static void main(String[] args) {
        HtmlDocument.Builder builder = new HtmlDocument.Builder();
        HtmlDocument htmlDocument = builder
                // 将指挥者要干的活自己干了
                .addHeader("This is the header")
                .addBody("This is the body")
                .addFooter("This is the footer")
                .build();

        log.info("htmlDocument:{}", htmlDocument);
    }
}
